#ifndef __SPOT_LIGHT_H__
#define __SPOT_LIGHT_H__

#include "PointLight.h"

class SpotLight : public PointLight
{

public:
	SpotLight();

	virtual Type get_type() const;

	Vector3& direction();
	Real& exponent();
	void set_angle( Real angle );
	Real get_angle() const;

	virtual void compute_diffuse( const Matrix3 world_rotate, 
		const Vector3& world_translate, Real world_scale,
		const Vector3* vertex, const Vector3* normal,
		unsigned int num_spot_lights, const bool* visible,
		Color* diffuse );

	virtual void compute_specular ( const Matrix3& world_rotate, const Vector3& world_translate,
		Real world_scale, const Vector3* vertex, const Vector3* normal,
		unsigned int num_spot_lights, const bool* visible,
		const Vector3& camera_model_location, Color* specular );

protected:
	Vector3 m_direction;
	Real m_angle, m_cos_sqr, m_sin_sqr;
	Real m_exponent;
};

#include "SpotLight.inl"

#endif
